/**
 * 
 */
package com.liusoft.android.fmagic;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Paint.Style;

/**
 * 绘图工具
 * @author Winter Lau
 */
public class BitmapUtils {

	/**
	 * 绘制图片边框
	 * @param bmp
	 * @return
	 */
	public static Bitmap MakeGamePiece(Bitmap bmp) {
		Canvas c = new Canvas(bmp);		
		c.drawRect(new RectF(1, 1, bmp.getWidth()-1, bmp.getHeight()-1), paint_piece);
		return bmp;
	}

	private static Paint paint_piece = new Paint();
	static {
		paint_piece.setColor(Color.WHITE);
		paint_piece.setStyle(Style.STROKE);
		paint_piece.setStrokeWidth(2);
		paint_piece.setAlpha(150);
	}
	
}
